import Vue from 'vue';
import VueRouter from 'vue-router';
import Index from '@/views/index/Index.vue';
import Category from '@/views/category/Index.vue';
import ArticleDetails from '@/views/index/components/ArticleDetails.vue';
Vue.use(VueRouter);

const routes = [
	{
		path: '/',
		name: 'Index',
		title: '首页',
		icon: 'home',
		hidden: false,
		component: Index
	},
	{
		path: '/category',
		name: 'Category',
		title: '分类',
		icon: 'menu',
		hidden: false,
		component: Category
	},{
		path: '/articleDetails/:id',
		name: 'articleDetails',
		component: ArticleDetails,
		hidden: true,
	  }
   
];

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
});

export default router;
